// Copyright (c) 2023 Huawei Device Co., Ltd.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//! `ylong_xml` is a library for XML parsing and writing.
//!
//! This module exposes key structures and traits for XML parsing
//! including nodes, elements, attributes, and output mechanisms.

#[macro_use]
mod output;
mod assist_string;
mod error;
mod grammar;
mod parse;
mod reader;
mod serializer_compact;
mod structure;

pub use error::{OtherError, ParseError, ReadError, XmlError, XmlErrorKind};
pub use output::CompactOutput;
pub use structure::{
    Attribute, CdataSection, CharacterDataMethod, ChildNode, ChildNodeMethod, Comment, Document,
    DocumentMethod, DomException, Element, ElementMethod, Encoding, Node, NodeList, NodeMap,
    NodeMethod, NodeType, ParentNodeMethod, Text, ValuedNodeMethod,
};

pub(crate) use parse::parse_document;
pub(crate) use reader::{IoReader, StrReader, Utf8Reader};

pub use serializer_compact::{to_string, to_writer};
